<template>  
    <link rel="stylesheet" href="/assets/css/my.css">
    <div class="usercenter">
        <div class="header">
            <div class="header_title">
            <div class="title_avatar">
                <img :src="business.avatar_text" alt="">
            </div>
            <div class="title_content">
                <div class="content_text">{{ business.nickname }}</div>
                <div class="content_sm">{{ business.createtime_text }}</div>
            </div>
            </div>
        </div>
        <div class="userorder">
            <div class="order_project">
            <div class="item">  
                <router-link :to="{path:'/business/retail'}" class="item">
                <div class="img"> <img src="/assets/images/retail1.png" alt=""></div>
                分销信息
                </router-link>
            </div>
            <div class="item">
                <router-link :to="{path:'/business/retailmember'}" class="item">
                <div class="img"> <img src="/assets/images/retail2.png" alt=""></div>
                分销会员
                </router-link>
            </div>
            <div class="item">
                <router-link :to="{path:'/business/kickback'}" class="item">
                <div class="img"> <img src="/assets/images/retail3.png" alt=""></div>
                分销佣金
                </router-link>
            </div>
            <div class="item">
                <router-link :to="{path:'/business/mycoupon'}" class="item">
                <div class="img"> <img src="/assets/images/coupon.png" alt=""></div>
                优惠列表
                </router-link>
            </div>
            <div class="item solid-left">
                <router-link :to="{path:'/business/deposit'}" class="item">
                <div class="img"> <img src="/assets/images/recharge2.png" alt=""></div>
                充值中心
                </router-link>
            </div>
            </div>
        </div>
        <div class="usertool">
            <div class="list">
            <div class="item">
                <router-link :to="{path:'/business/profile'}">
                <div class="img">
                    <img src="/assets/images/profile.png" alt="">
                </div>
                基本资料
                </router-link>
            </div>
            <div class="item">
                <router-link :to="{path:'/order/index'}">
                <div class="img">
                    <img src="/assets/images/recharge2.png" alt="">
                </div>
                全部订单
                </router-link>
            </div>
            <div class="item">
                <router-link :to="{path:'/teamorder/index'}">
                <div class="img">
                    <img src="/assets/images/pingtuan.png" alt="">
                </div>
                拼团订单
                </router-link>
            </div>
            <div class="item">
                <router-link :to="{path:'/address/index'}" >
                <div class="img"> <img src="/assets/images/address.png" alt=""></div>
                收货地址
                </router-link>
            </div>
            <div class="item">
                <router-link :to="{path: '/business/email'}">
                <div class="img"> <img src="/assets/images/email.png" alt=""></div>
                邮箱认证
                </router-link>
            </div>
            <div class="item">
                <router-link :to="{path:'/business/record'}" >
                    <div class="img"> <img src="/assets/images/consume.png" alt=""></div>
                    消费记录
                </router-link>
            </div>
            <div class="item">
                <a href="record.html">
                <div class="img"> <img src="/assets/images/recharge1.png" alt=""></div>
                充值记录
                </a>
            </div>
            <div class="item">
                <a herf="javascript:void(0)" @click="logout">
                    <div class="img">
                        <img src="/assets/images/returns.png" alt="">
                    </div>
                    退出登录
                </a>
            </div>
            </div>
        </div>
        <div class="usertool">
            <ul class="proul">
            <li>
                <a href="detail.html"><img src="/assets/images/7.jpg"/></a>
                <a href="detail.html"><p class="tit">学院风原创jk制服纯欲收腰白衬衫女夏季校供百褶短裙韩系辣妹套装</p></a>
                <div class="price">
                <p>￥169.9</p>
                </div>     
            </li>
            <li>
                <a href="detail.html"><img src="/assets/images/4.jpg"/></a>
                <a href="detail.html"><p class="tit">狗皮皮jk制服 日系校供感纯色衬衫小岚中短袖</p></a>
                <div class="price">
                <p>￥80</p>
                </div>
            </li>
            <li>
                <a href="detail.html"><img src="/assets/images/5.jpg"/></a>
                <a href="detail.html"><p class="tit">法式性感v领吊带连衣裙女夏内搭高级感气质外穿醋酸缎面打底长裙</p></a>
                <div class="price">
                <p>￥368</p>
                </div>    
            </li>
            <li>
                <a href="detail.html"><img src="/assets/images/6.jpg"/></a>
                <a href="detail.html"><p class="tit">原创jk制服套装（深海）正版校供绀色水手服箱褶裙长袖短袖套装女</p></a>
                <div class="price">
                <p>￥198</p>
                </div>     
            </li>
            </ul>
        </div>
        <div class="h54"></div>
        <div class="clear"></div>
    </div>
  <tabbar />
</template>

<script setup>
  import tabbar from '@/components/common/tabbar.vue';

  //获取this对象
  const {proxy} = getCurrentInstance()

  let business = proxy.$business

  let logout = () => {
    proxy.$confirm({
        message: '是否确认退出',
    }).then(()=>{ //确认
        //删除cookie，跳转
        proxy.$cookies.remove('business')
        proxy.$cookies.remove('redirect')

        //退出到登录界面
        proxy.$router.push('/business/login')
        return
    }).catch(()=>{})
  }
</script>